package com.yc.rh.entities;

import java.io.Serializable;

public class ViewsInfo implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private int smid;
	private String snmovie;
	private String smname;
	private String smdate;
	public int getSmid() {
		return smid;
	}
	public void setSmid(int smid) {
		this.smid = smid;
	}
	public String getSnmovie() {
		return snmovie;
	}
	public void setSnmovie(String snmovie) {
		this.snmovie = snmovie;
	}
	public String getSmname() {
		return smname;
	}
	public void setSmname(String smname) {
		this.smname = smname;
	}
	public String getSmdate() {
		if(smdate!=null){
			smdate=smdate.substring(0, smdate.indexOf("."));
		}
		return smdate;
	}
	public void setSmdate(String smdate) {
		this.smdate = smdate;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((smdate == null) ? 0 : smdate.hashCode());
		result = prime * result + smid;
		result = prime * result + ((smname == null) ? 0 : smname.hashCode());
		result = prime * result + ((snmovie == null) ? 0 : snmovie.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ViewsInfo other = (ViewsInfo) obj;
		if (smdate == null) {
			if (other.smdate != null)
				return false;
		} else if (!smdate.equals(other.smdate))
			return false;
		if (smid != other.smid)
			return false;
		if (smname == null) {
			if (other.smname != null)
				return false;
		} else if (!smname.equals(other.smname))
			return false;
		if (snmovie == null) {
			if (other.snmovie != null)
				return false;
		} else if (!snmovie.equals(other.snmovie))
			return false;
		return true;
	}
	public ViewsInfo(int smid, String snmovie, String smname, String smdate) {
		super();
		this.smid = smid;
		this.snmovie = snmovie;
		this.smname = smname;
		this.smdate = smdate;
	}
	@Override
	public String toString() {
		return "ViewsInfo [smid=" + smid + ", snmovie=" + snmovie + ", smname="
				+ smname + ", smdate=" + smdate + "]";
	}
	public ViewsInfo() {
		super();
	}
	
	
	
}
